﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<KnitwearCompany.Models.Product>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Просмотр продукта <%= Model.Name%>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2><%= Model.Name%></h2>

        <% using (Html.BeginForm()) {%>

        <fieldset>
            
            <div class="editor-label">
                Название: <%= Model.Name%>
            </div>
            <div class="editor-label">
                Описание: <%= Model.Description%>
            </div>
            <div class="editor-label">
                Цена: <%= Model.Price%>
            </div>
            <div class="editor-label">
                Категория: <%= Model.Category.Name%>
            </div>
        </fieldset>

    <% } %>
    <br/><br/>
    <form action="/Home/Buy/<%= Model.Id %>" method="post">
        <%: Html.TextBox("amount", "1")%>
        <br/>
        <input type="submit" value="Купить" />
    </form>
    <br/><br/>
    <%: Html.ActionLink("Назад", "ViewCategory", "Home", new { Model.Category.Id }, null)%>
</asp:Content>
